var fs = require('fs');
var files = fs.readdirSync('./public/images');

module.exports = (function (){
    return {
        list : function(req, res){
            console.log(req.he);
            res.send(files);
        },
        index : function(req, res){
            res.type('html');
            res.render('index',{images:files});
        }
    }
})();